<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - iris.info - MemCtrl/MC.cc</title>
  <link rel="stylesheet" type="text/css" href="../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../index.html">directory</a> - <a href="index.html">MemCtrl</a> - MC.cc</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>iris.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-05-24</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">31</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">100.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">31</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : /*
<span class="lineNum">       2 </span>                :  * =====================================================================================
<span class="lineNum">       3 </span>                :  *
<span class="lineNum">       4 </span>                :  *       Filename:  MC.cc
<span class="lineNum">       5 </span>                :  *
<span class="lineNum">       6 </span>                :  *    Description:  
<span class="lineNum">       7 </span>                :  *
<span class="lineNum">       8 </span>                :  *        Version:  1.0
<span class="lineNum">       9 </span>                :  *        Created:  04/07/2010 07:16:00 PM
<span class="lineNum">      10 </span>                :  *       Revision:  none
<span class="lineNum">      11 </span>                :  *       Compiler:  gcc
<span class="lineNum">      12 </span>                :  *
<span class="lineNum">      13 </span>                :  *         Author:  SYED MINHAJ HASSAN
<span class="lineNum">      14 </span>                :  *        Company:  Georgia Institute of Technology
<span class="lineNum">      15 </span>                :  *
<span class="lineNum">      16 </span>                :  * =====================================================================================
<span class="lineNum">      17 </span>                :  */
<span class="lineNum">      18 </span>                : #include &quot;MC.h&quot;
<span class="lineNum">      19 </span>                : 
<span class="lineNum">      20 </span><span class="lineCov">              8 : void MC::Init()</span>
<span class="lineNum">      21 </span>                : {
<span class="lineNum">      22 </span><span class="lineCov">              8 :     reqH-&gt;mc = (Component*)this;</span>
<span class="lineNum">      23 </span><span class="lineCov">              8 :     bus-&gt;mc = (Component*)this;</span>
<span class="lineNum">      24 </span><span class="lineCov">              8 :     dram-&gt;mc = (Component*)this;</span>
<span class="lineNum">      25 </span><span class="lineCov">              8 :     responseH-&gt;mc = (Component*)this;</span>
<span class="lineNum">      26 </span><span class="lineCov">              8 :     refMgr-&gt;mc = (Component*)this;</span>
<span class="lineNum">      27 </span>                : //    ni-&gt;mc = (Component*)this;
<span class="lineNum">      28 </span>                :  
<span class="lineNum">      29 </span><span class="lineCov">              8 :     reqH-&gt;parent = (Component*)ni;</span>
<span class="lineNum">      30 </span><span class="lineCov">              8 :     reqH-&gt;child  = (Component*)bus;</span>
<span class="lineNum">      31 </span><span class="lineCov">              8 :     bus-&gt;parent = (Component*)reqH;</span>
<span class="lineNum">      32 </span><span class="lineCov">              8 :     bus-&gt;child1 = (Component*)dram;  // dram link</span>
<span class="lineNum">      33 </span><span class="lineCov">              8 :     bus-&gt;child2 = (Component*)responseH; //response link     </span>
<span class="lineNum">      34 </span><span class="lineCov">              8 :     dram-&gt;parent = (Component*)bus; </span>
<span class="lineNum">      35 </span><span class="lineCov">              8 :     responseH-&gt;parent = (Component*)bus;</span>
<span class="lineNum">      36 </span><span class="lineCov">              8 :     responseH-&gt;child = (Component*)ni;                       </span>
<span class="lineNum">      37 </span><span class="lineCov">              8 :     reqH-&gt;SetLinks();        // TODO need to fix these for parallel versions</span>
<span class="lineNum">      38 </span><span class="lineCov">              8 :     bus-&gt;SetLinks(); // No ptrs thrown here &amp; there</span>
<span class="lineNum">      39 </span><span class="lineCov">              8 :     dram-&gt;SetLinks();        </span>
<span class="lineNum">      40 </span><span class="lineCov">              8 :     reqH-&gt;resPtr = (Component*)responseH;</span>
<span class="lineNum">      41 </span><span class="lineCov">              8 :     responseH-&gt;reqPtr = (Component*)reqH;            </span>
<span class="lineNum">      42 </span><span class="lineCov">              8 :     refMgr-&gt;reqPtr = reqH;</span>
<span class="lineNum">      43 </span>                :     
<span class="lineNum">      44 </span><span class="lineCov">              8 :     StartRefresh();</span>
<span class="lineNum">      45 </span><span class="lineCov">              8 :     stats-&gt;mc = (Component*)this;    </span>
<span class="lineNum">      46 </span><span class="lineCov">              8 :     stats-&gt;InitStats();      </span>
<span class="lineNum">      47 </span><span class="lineCov">              8 : }</span>
<span class="lineNum">      48 </span>                : 
<span class="lineNum">      49 </span><span class="lineCov">              8 : void MC::StartRefresh()</span>
<span class="lineNum">      50 </span>                : {
<span class="lineNum">      51 </span><span class="lineCov">             16 :     refMgr-&gt;nextRefresh = REFRESH_INC;       </span>
<span class="lineNum">      52 </span><span class="lineCov">              8 :     IrisEvent *event = new IrisEvent();</span>
<span class="lineNum">      53 </span><span class="lineCov">              8 :     event-&gt;src = (Component*)this;</span>
<span class="lineNum">      54 </span><span class="lineCov">              8 :     event-&gt;dst = (Component*)refMgr;                 </span>
<span class="lineNum">      55 </span><span class="lineCov">              8 :     Simulator::Schedule(Simulator::Now()+refMgr-&gt;nextRefresh, &amp;RefreshMgr::process_event, (RefreshMgr*)event-&gt;dst, event);            </span>
<span class="lineNum">      56 </span><span class="lineCov">             10 : }</span>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
